<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box"></div>
    <script>
        var obj = {
            username: "wanggouhui",
            age: 20,
            gender: "female"
        }
        var li = `
        <ul>
            <li>${obj.username}</li>
            <li>${obj.age}</li>
            <li>${obj.gender}</li>
        </ul>
        `
        var box = document.querySelector(".box");
        box.innerHTML = li
    </script>
</body>

</html>